import request from "./request.js"


/**
 * 获取用户信息
 */
export function getUserInfo() {
	return request({
		url: '/business/api/clientUser/userInfo',
		method: 'GET'
	})
}
/**
 * 获取用户信息 并返回错误结果
 */
export function getUserInfoResolve() {
	return request({
		url: '/business/api/clientUser/userInfo',
		method: 'GET',
		header: {
			resolve: true
		}
	})
}
/**
 * 用户基础信息修改
 */
export function updateUserInfo() {
	return request({
		url: '/business/api/clientUser/updateUserInfo',
		method: 'POST'
	})
}
/**
 * 手机号密码注册账号
 */
export function phoneRegister(data) {
	return request({
		url: '/business/api/clientUser/phoneRegister',
		method: 'POST',
		data
	})
}

/**
 * 账号密码登录
 */
export function phonePasswordLogin(data) {
	return request({
		url: '/business/api/clientUser/phonePasswordLogin',
		method: 'POST',
		data
	})
}

/**
 * 验证码登录及注册
 */
export function phoneCodeLogin(data) {
	return request({
		url: '/business/api/clientUser/phoneCodeLogin',
		method: 'POST',
		data
	})
}
/**
 * 短信发送
 */
export function sendCode(data) {
	return request({
		url: '/business/api/common/sendSms',
		method: 'POST',
		data
	})
}

/**
 * 更换手机号
 */
export function updatePhone(data) {
	return request({
		url: '/business/api/clientUser/updatePhone',
		method: 'POST',
		data
	})
}

/**
 * 修改登录或支付密码
 */
export function updatePassword(data) {
	return request({
		url: '/business/api/clientUser/updatePassword',
		method: 'POST',
		data
	})
}